/**
 * 第1阶段 模块1 题3
 */

package stage1.module1;

public class Q3 {

    public static void main(String[] args) {

        // setup program constants
        final String PLACEHOLDER = " ";
        final String HEADER = "0123456789abcdef";
        // string used to represent the cell of the board
        final String FILLING = "+";
        // size of the square board
        final int SIZE = 16;

        System.out.print(PLACEHOLDER);

        // print col headers
        System.out.print(PLACEHOLDER);
        for (int i = 0; i < SIZE; i++) {
            System.out.print(HEADER.charAt(i));
            System.out.print(PLACEHOLDER);
        }
        System.out.println("");

        // now, print each row
        for (int i = 0; i < SIZE; i++) {
            System.out.print(HEADER.charAt(i));
            System.out.print(PLACEHOLDER);
            for (int j = 0; j < SIZE; j++) {
                System.out.print(FILLING);
                System.out.print(PLACEHOLDER);
            }
            System.out.println("");
        }
    }
}
